/**
 * 
 */
package com.india.airline;

import com.india.RouteCode;
import com.india.StopNode;
import com.sangharsh.core.algo.location.Location;

/**
 * @author pradeep
 *
 */
public enum AirlineNode implements StopNode {
	AGX(1,"Agatti Island, Lakshadweep Islands",1,1,false),
	AGR(1,"Agra, Uttar Pradesh",1,1,false), 
	AMD(1,"Ahmedabad, Gujarat",1,1,false), 
	AJL(1,"Aizawl, Mizoram",1,1,false), 
	AKD(1,"Akola, Maharashtra",1,1,false), 
	IXD(1,"Allahabad, Uttar Pradesh",1,1,false), 
	IXV(1,"Along, Arunachal Pradesh",1,1,false), 
	ATQ(1,"Amritsar, Punjab",1,1,false), 
	QNB(1,"Anand, Gujarat",1,1,false), 
	IXU(1,"Aurangabad, Maharashtra",1,1,false), 
	IXB(1,"Bagdogra, Siliguri, West Bengal",1,1,false), 
	RGH(1,"Balurghat, West Bengal",1,1,false), 
	BLR(1,"Bangalore, Karnataka",1,1,false), 
	IXG(1,"Belgaum, Karnataka",1,1,false), 
	BEP(1,"Bellary, Karnataka",1,1,false), 
	BUP(1,"Bhatinda, Punjab",1,1,false),
	BHU(1,"Bhavnagar, Gujarat",1,1,false),
	BHO(1,"Bhopal, Madhya Pradesh",1,1,false),
	BBI(1,"Bhubaneshwar, Orissa",1,1,false), 
	BHJ(1,"Bhuj, Gujarat",1,1,false), 
	BKB(1,"Bikaner, Rajasthan",1,1,false),
	PAB(1,"Bilaspur, Madhya Pradesh",1,1,false),
	BDI(1,"Bird Island (Chidiya Tapu/Chiriya Tapu), Andaman and Nicobar Islands",1,1,false),
	BOM(1,"Mumbai (Bombay), Maharashtra",1,1,false),
	CCU(1,"Kolkata (Calcutta), West Bengal",1,1,false), 
	CCJ(1,"Kozhikode (Calicut), Kerala",1,1,false),
	CBD(1,"Car Nicobar, Andaman and Nicobar Islands",1,1,false),
	IXC(1,"Chandigarh",1,1,false), 
	COK(1,"Kochi (Cochin), Kerala",1,1,false),
	CJB(1,"Coimbatore, Tamil Nadu",1,1,false),
	COH(1,"Cooch Behar, West Bengal",1,1,false), 
	CDP(1,"Cuddapah, Andhra Pradesh",1,1,false), 
	NMB(1,"Daman",1,1,false),
	DAE(1,"Daparizo, Arunachal Pradesh",1,1,false), 
	DAI(1,"Darjeeling, West Bengal",1,1,false), 
	DED(1,"Dehradun, Uttaranchal",1,1,false), 
	DEL(100002,"Delhi",28.55655,77.10079,true), 
	DBD(1,"Dhanbad, Jharkhand",1,1,false),
	DHM(1,"Dharamshala, Himachal Pradesh",1,1,false), 
	DIB(1,"Dibrugarh, Assam",1,1,false), 
	DMU(1,"Dimapur, Nagaland",1,1,false), 
	DIU(1,"Diu",1,1,false), 
	QNF(1,"Faridabad, Haryana",1,1,false),
	GAU(1,"Guwahati (Gauhati), Assam",1,1,false), 
	GAY(1,"Gaya, Bihar",1,1,false), 
	GOI(1,"Goa",1,1,false), 
	GOP(1,"Gorakhpur, Uttar Pradesh",1,1,false), 
	GUX(1,"Guna, Madhya Pradesh",1,1,false), 
	GWL(1,"Gwalior, Madhya Pradesh",1,1,false), 
	HSS(1,"Hissar, Haryana",1,1,false), 
	HBX(1,"Hubli, Karnataka",1,1,false), 
	HYD(100001,"Hyderabad, Andhra Pradesh",17.23523,78.42969,true), 
	IMF(1,"Imphal, Manipur",1,1,false), 
	IDR(1,"Indore, Madhya Pradesh",1,1,false), 
	JLR(1,"Jabalpur, Madhya Pradesh",1,1,false), 
	JGB(1,"Jagdalpur, Chhattisgarh",1,1,false), 
	JAI(1,"Jaipur, Rajasthan",1,1,false), 
	JSA(1,"Jaisalmer, Rajasthan",1,1,false),
	IXJ(1,"Jammu, Jammu & Kashmir",1,1,false), 
	JGA(1,"Jamnagar, Gujarat",1,1,false), 
	IXW(1,"Jamshedpur, Bihar",1,1,false), 
	PYB(1,"Jeypore, Orissa",1,1,false),
	JDH(1,"Jodhpur, Rajasthan",1,1,false),
	JRH(1,"Jorhat, Assam",1,1,false), 
	IXH(1,"Kailashahar, Tripura",1,1,false),
	IXQ(1,"Kamalpur, Tripura",1,1,false), 
	IXY(1,"Kandla, Gujarat",1,1,false), 
	KNU(1,"Kanpur, Uttar Pradesh",1,1,false),
	IXK(1,"Keshod, Gujarat",1,1,false), 
	HJR(1,"Khajuraho, Madhya Pradesh",1,1,false), 
	IXN(1,"Khowai, Tripura",1,1,false), 
	KLH(1,"Kolhapur, Maharashtra",1,1,false), 
	KTU(1,"Kota, Rajasthan",1,1,false), 
	KUU(1,"Kulu, Himachal Pradesh",1,1,false),
	IXL(1,"Leh, Jammu & Kashmir",1,1,false),
	IXI(1,"Lilabari (North Lakhimpur), Assam",1,1,false),
	LKO(1,"Lucknow, Uttar Pradesh",1,1,false), 
	LUH(1,"Ludhiana, Punjab",1,1,false), 
	MAA(1,"Chennai (Madras), Tamil Nadu",1,1,false),
	IXM(1,"Madurai, Tamil Nadu",1,1,false),
	SEZ(1,"Mahe Island, Union Territory of Pondicherry",1,1,false),
	LDA(1,"Malda, West Bengal",1,1,false), 
	IXE(1,"Mangalore, Karnataka",1,1,false), 
	MOH(1,"Mohanbari, Assam",1,1,false),
	MZA(1,"Muzaffarnagar, Uttar Pradesh",1,1,false),
	MZU(1,"Muzaffarpur, Bihar",1,1,false),
	MYQ(1,"Mysore, Karnataka",1,1,false),
	NAG(1,"Nagpur, Maharashtra",1,1,false), 
	NDC(1,"Nanded, Maharashtra",1,1,false),
	ISK(1,"Nasik, Maharashtra",1,1,false), 
	QNW(1,"Nawanshahar, Punjab",1,1,false),
	NVY(1,"Neyveli, Tamil Nadu",1,1,false),
	OMN(1,"Osmanabad, Maharashtra",1,1,false),
	DBL(1,"Dabolim, Panaji, Goa",1,1,false),
	PGH(1,"Pantnagar, Uttaranchal",1,1,false),
	IXT(1,"Passighat (East Siang), Arunachal Pradesh",1,1,false),
	IXP(1,"Pathankot, Punjab",1,1,false),
	PAT(1,"Patna, Bihar",1,1,false), 
	PNY(1,"Pondicherry",1,1,false),
	IXZ(1,"Port Blair, Andaman and Nicobar Islands",1,1,false),
	PNQ(1,"Pune, Maharashtra",1,1,false), 
	PBD(1,"Porbandar, Gujarat",1,1,false), 
	BEK(1,"Puttaparthi, Andhra Pradesh",1,1,false), 
	PUT(1,"Rae Bareli, Uttar Pradesh",1,1,false), 
	RPR(1,"Raipur, Chhattisgarh",1,1,false),
	RJA(1,"Rajahmundry, Andhra Pradesh",1,1,false), 
	RAJ(1,"Rajkot, Gujarat",1,1,false),
	RJI(1,"Rajouri, Jammu & Kashmir",1,1,false),
	RMD(1,"Ramagundam, Andhra Pradesh",1,1,false),
	IXR(1,"Ranchi, Jharkhand",1,1,false),
	RTC(1,"Ratnagiri, Maharashtra",1,1,false),
	REW(1,"Rewa, Madhya Pradesh",1,1,false),
	RRK(1,"Rourkela, Orissa",1,1,false),
	RUP(1,"Rupsi, Assam",1,1,false),
	TNI(1,"Satna, Madhya Pradesh",1,1,false),
	SHL(1,"Shillong, Meghalaya",1,1,false),
	SSE(1,"Sholapur, Maharashtra",1,1,false), 
	IXS(1,"Silchar, Assam",1,1,false), 
	SLV(1,"Shimla, Himachal Pradesh",1,1,false), 
	SXR(1,"Srinagar, Jammu & Kashmir",1,1,false),
	STV(1,"Surat, Gujarat",1,1,false), 
	TEZ(1,"Tezpur, Assam",1,1,false),
	TEI(1,"Tezu, Arunachal Pradesh",1,1,false), 
	TJV(1,"Thanjavur, Tamil Nadu",1,1,false), 
	TRZ(1,"Tiruchirapally, Tamil Nadu",1,1,false),
	TIR(1,"Tirupati, Andhra Pradesh",1,1,false),
	TRV(1,"Thiruvanathapuram (Trivandrum), Kerala",1,1,false),
	TCR(1,"Tuticorin, Tamil Nadu",1,1,false),
	UDR(1,"Udaipur, Rajasthan",1,1,false), 
	BDQ(1,"Vadodara (Baroda), Gujarat",1,1,false),
	VNS(1,"Varanasi (Benaras), Uttar Pradesh",1,1,false), 
	VGA(1,"Vijayawada, Andhra Pradesh",1,1,false), 
	VTZ(1,"Vishakhapatnam, Andhra Pradesh",1,1,false),
	VIZ(1,"Vizag, Andhra Pradesh",1,1,false),
	WGC(1,"Warangal, Andhra Pradesh",1,1,false),
	ZER(1,"Zero, Arunachal Pradesh",1,1,false)
	;
	private int id;
	private String name;
	private double longitude;
	private double latitude;
	private boolean active;
	private RouteCode routeCode;

	AirlineNode(int id, String name, double latitude, double longitude, boolean active) {
		this.id = id;
		this.name = name;
		this.latitude = latitude;
		this.longitude = longitude;
		this.active = active;
	}

	public int getId() {
		return id;
	}

	public String getName() {
		return name;
	}

	public double getLongitude() {
		return longitude;
	}

	public double getLatitude() {
		return latitude;
	}

	public String getCode() {
		return this.toString();
	}

	public boolean isActive() {
		return active;
	}
	
	@Override
	public RouteCode getRouteCode() {
		return routeCode;
	}

	@Override
	public void setRouteCode(RouteCode routeCode) {
		this.routeCode = routeCode;
	}

	public static AirlineNode lookupById(int id){
		for(AirlineNode node : values()){
			if(node.getId() == id){
				return node;
			}
		}
		return null;
	}
	
	@Override
	public Location getLocation(){
		return Location.getLocation(this.latitude, this.longitude);
	}
}
